package org.jetlinks.demo.protocol.siterwell.tcp.message;

import java.text.SimpleDateFormat;
import java.util.Date;


public class S2DAuthResponse extends AbstractCommandResponse {

    public static S2DAuthResponse of(D2SAuthRequest authRequest){
        S2DAuthResponse authResponse = new S2DAuthResponse(authRequest) ;
        return authResponse ;
    }

    public S2DAuthResponse(AbstractCommandRequest request){
        super(request);
    }

    @Override
    public String getHexResponseData() {
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
        String formatDate = simpleDateFormat.format(new Date());
        StringBuilder sb = new StringBuilder();
        sb.append("00");
        sb.append(formatDate);
        return sb.toString();
    }

}
